<?php
namespace Amis\form;
class CheckBoxs extends FormItem
{
    public string $type = 'checkboxs';

    public function options($options)
    {
        $this->options = $options;
        return $this;
    }

    public function source($api)
    {
        $this->source = $api;
        return $this;
    }

    public function delimiter($delimiter = ',')
    {
        $this->delimiter = $delimiter;
        return $this;
    }

    public function labelField(string $labelField = 'label')
    {
        $this->labelField = $labelField;
        return $this;
    }

    public function valueField(string $valueField = 'value')
    {
        $this->valueField = $valueField;
        return $this;
    }

    public function joinValues(bool $joinValues = true)
    {
        $this->joinValues = $joinValues;
        return $this;
    }

    public function extractValue(bool $extractValue = false)
    {
        $this->extractValue = $extractValue;
        return $this;
    }

    public function columnsCount(int $columnsCount = 1)
    {
        $this->columnsCount = $columnsCount;
        return $this;
    }

    public function checkAll(bool $checkAll = false)
    {
        $this->checkAll = $checkAll;
        return $this;
    }

    public function inline(bool $inline = true)
    {
        $this->inline = $inline;
        return $this;
    }

    public function defaultCheckAll(bool $defaultCheckAll = false)
    {
        $this->defaultCheckAll = $defaultCheckAll;
        return $this;
    }

    public function creatable(bool $creatable = false)
    {
        $this->creatable = $creatable;
        return $this;
    }

    public function createBtnLabel(string $createBtnLabel = '新增选项')
    {
        $this->createBtnLabel = $createBtnLabel;
        return $this;
    }

    public function addControls(array $addControls)
    {
        $this->addControls = $addControls;
        return $this;
    }

    public function addApi(string $addApi)
    {
        $this->addApi = $addApi;
        return $this;
    }

    public function editable(bool $editable = false)
    {
        $this->editable = $editable;
        return $this;
    }

    public function editControls(array $editControls)
    {
        $this->editControls = $editControls;
        return $this;
    }

    public function editApi(string $editApi)
    {
        $this->editApi = $editApi;
        return $this;
    }

    public function deleteApi(string $deleteApi)
    {
        $this->deleteApi = $deleteApi;
        return $this;
    }

    public function removable(bool $removable = false)
    {
        $this->removable = $removable;
        return $this;
    }
}